/*
package com.wishtree.domain.entity;

import graphql.annotations.annotationTypes.GraphQLDataFetcher;
import graphql.annotations.annotationTypes.GraphQLField;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import lombok.Data;
import lombok.Getter;

import java.time.LocalDateTime;

*/
/**
 * @Author parkin
 * @Date 2021/11/2 10:23
 * @Version 2.0
 * @Description 愿望
 *//*

@Data
public class Wish {
    @GraphQLField
    private Long id;
    // 发布愿望的用户
    @GraphQLField
    private Long userId;
    // 愿望内容
    @GraphQLField
    private String content;
    // 发布时间
    @GraphQLDataFetcher(value = LocalDateTimeFetcher.class)
    private LocalDateTime publishTime = LocalDateTime.now();

    public Wish(String content,Long userId) {
        this.content = content;
        this.userId = userId;
    }

    public static class LocalDateTimeFetcher implements DataFetcher<LocalDateTime> {

        @Override
        public LocalDateTime get(DataFetchingEnvironment environment) throws Exception {
            return LocalDateTime.now();
        }
    }

}
*/
